import request from '@/utils/request'

// 查询阶段列表
export function listPhase(query) {
  return request({
    url: '/ehr/phase/list',
    method: 'get',
    params: query
  })
}

// 查询阶段详细
export function getPhase(workEffortId) {
  return request({
    url: '/ehr/phase/' + workEffortId,
    method: 'get'
  })
}

// 获取项目阶段数据
export function getProjectPhase(projectId) {
  return request({
    url: '/ehr/phase/projectPhases/' + projectId,
    method: 'get'
  })
}

// 新增阶段
export function addPhase(data) {
  return request({
    url: '/ehr/phase',
    method: 'post',
    data: data
  })
}

// 修改阶段
export function updatePhase(data) {
  return request({
    url: '/ehr/phase',
    method: 'put',
    data: data
  })
}

// 删除阶段
export function delPhase(workEffortId) {
  return request({
    url: '/ehr/phase/' + workEffortId,
    method: 'delete'
  })
}

